package com.example.actordemo1.bus;

import akka.actor.ActorRef;
import akka.event.japi.LookupEventBus;

public class MyLookupEventBus extends LookupEventBus<EventVo, ActorRef,String> {
    @Override
    public int mapSize() {
        return 8;
    }

    @Override
    public int compareSubscribers(ActorRef a, ActorRef b) {
        return a.compareTo(b);
    }

    @Override
    public String classify(EventVo event) {
        return event.getType();
    }

    @Override
    public void publish(EventVo event, ActorRef subscriber) {
        subscriber.tell(event.getMsg(),ActorRef.noSender());
    }
//    @Override
//    public int mapSize() {
//        return 8;
//    }
//
//    @Override
//    public int compareSubscribers(Object a, Object b) {
//        return 0;
//    }
//
//    @Override
//    public Object classify(Object event) {
//        return null;
//    }
//
//    @Override
//    public void publish(Object event, Object subscriber) {
//
//    }
}
